package uk.gov.swmprobation.swm;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.Window;

public class Documents extends Activity {
	
	public final static String RAW_FILE = "uk.gov.swmprobation.swm.RAWFILE";
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
        setContentView(R.layout.activity_documents);
        getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.title_bar);
	}

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_documents, menu);
        return true;
    }
    
    public void readCP(View view) {
        Intent intent = new Intent(this, DocumentView.class);
        int rawfile = R.raw.cp;
        intent.putExtra(RAW_FILE, rawfile);
        startActivity(intent);
    }
    
    public void readOM(View view) {
        Intent intent = new Intent(this, DocumentView.class);
        int rawfile = R.raw.om;
        intent.putExtra(RAW_FILE, rawfile);
        startActivity(intent);
    }
    
    public void readComplaint(View view) {
        Intent intent = new Intent(this, DocumentView.class);
        int rawfile = R.raw.complaint;
        intent.putExtra(RAW_FILE, rawfile);
        startActivity(intent);
    }
}
